﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PersonalWebSite.Common;
using log4net;
using log4net.Config;

namespace PersonalWebSite.Controllers
{
    /// <summary>
    /// Defines the base class for controllers
    /// </summary>
    public class BaseController : Controller
    {
        #region Variables
        private ClientReferencesManager clientReferencesManager = new ClientReferencesManager();
        private readonly ILog logger = LogManager.GetLogger(typeof(BaseController));
        #endregion

        #region Properties
        /// <summary>
        /// Gets the base logger
        /// </summary>
        public ILog Logger
        {
            get
            {
                return logger;
            }
        }
        #endregion

        #region Constructor
        /// <summary>
        /// Creates a new instance of this type
        /// </summary>
        public BaseController()
        {
            
            log4net.Config.XmlConfigurator.Configure();
        }
        #endregion

        /// <summary>
        /// Gets the ClientReferencesManager
        /// </summary>
        public ClientReferencesManager ClientReferencesManager
        {
            get
            {
                return clientReferencesManager;
            }
        }
    }
}